//
//  RedBagDetailInfoTableViewCell.m
//  智积分
//
//  Created by Cynic on 2018/8/1.
//  Copyright © 2018年 Cynic. All rights reserved.
//

#import "RedBagDetailInfoTableViewCell.h"

@implementation RedBagDetailInfoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    /*@property (nonatomic ,retain)UIButton *header;
     @property (nonatomic ,retain)UILabel *name;
     @property (nonatomic ,retain)UILabel *time;
     @property (nonatomic ,retain)UILabel *cents;*/
    _header = [[UIButton alloc]initWithFrame:CGRectZero];
    _header.layer.cornerRadius = 20;
    _header.backgroundColor = bggrayColor;
    [self.contentView addSubview:_header];
    [_header mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(12);
        make.centerY.mas_equalTo(0);
        make.top.mas_equalTo(8);
        make.size.mas_equalTo(CGSizeMake(40, 40));
    }];
    
    _name = [[UILabel alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:_name];
    _name.textColor = [UIColor blackColor];
    _name.font = [UIFont systemFontOfSize:14];
    [_name mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(62);
        make.top.mas_equalTo(8);
        make.height.mas_equalTo(14);
        make.right.mas_equalTo(-100);
    }];
    
    _time = [[UILabel alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:_time];
    _time.textColor = [UIColor ColorWithHex:@"999999" withAlpha:1];
    _time.font = [UIFont systemFontOfSize:13];
    [_time mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(62);
        make.bottom.mas_equalTo(-8);
        make.height.mas_equalTo(13);
        make.right.mas_equalTo(-100);
    }];
    
    _cents = [[UILabel alloc] initWithFrame:CGRectZero];
    _cents.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:_cents];
    _cents.font = [UIFont systemFontOfSize:15];
    _cents.textColor = [UIColor ColorWithHex:@"F5A100" withAlpha:1];
    [_cents mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-10);
        make.centerY.mas_equalTo(0);
        make.width.mas_equalTo(80);
        make.height.mas_equalTo(15);
    }];
    
    [self loadLayerViewBaseView:self.contentView withHit:1 withDistype:2 withColor:bggrayColor];
    
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
